package cn.coisini.model.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author xiangshaw
 * Description: 轮播图 实体
 */
@Data
@Tag(name = "轮播图实体")
@TableName("tb_carousel")
public class Carousel {

    @Schema(description = "主键ID")
    @TableId("id")
    private String id;

    @Schema(description = "轮播图地址")
    @TableField("carousel_url")
    private String carouselUrl;

    @Schema(description = "轮播图跳转地址")
    @TableField("redirect_url")
    private String redirectUrl;

    @Schema(description = "轮播图排序")
    @TableField("carousel_rank")
    private Integer carouselRank;

    @Schema(description = "创建者ID")
    @TableField("create_user")
    private String createUser;

    @Schema(description = "更新者ID")
    @TableField("update_user")
    private String updateUser;

    @Schema(description = "创建时间")
    @TableField("create_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING , pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField("update_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING , pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime updateTime;

    @Schema(description = "删除标记（0可用 1已删除）")
    @TableField("del_flag")
    private Integer delFlag;
}
